
local oo = require "loop.base";

Command = oo.class{};

function Command:parse(scriptname)
	if scriptname == nil then
		print("Argument of the command is null");
		os.exit(1);
	end
	scriptname = string.upper(string.sub(scriptname, 1, 1)) .. string.sub(scriptname, 2, string.len(scriptname));
	local x, y = string.find(scriptname, "-");
	while x ~= nil do
		scriptname = string.sub(scriptname, 1, x-1) .. string.upper(string.sub(scriptname, y+1, y+1)) .. string.sub(scriptname, y+2, string.len(scriptname));
		x, y = string.find(scriptname, "-");
	end
	Command.scriptName = scriptname..".lua";
end
